// 评论类型定义
export interface Comment {
  id: string;
  userId: string;
  nickname: string;
  avatar: string;
  content: string;
  articleId: string;
  likes: number;
  dislikes: number
  targetNickname: string;
  createTime: string;
  isLike: boolean;
  isDisLike: boolean;
  replyList: Reply[];
}

// 回复类型定义
export interface Reply {
  id: string;
  content: string;
  userId: string;
  nickname: string;
  avatar: string;
  targetUserId: string;      // 被回复用户的ID
  targetAvatar: string;      // 被回复用户的头像
  targetNickname: string;    // 被回复用户的昵称
  commentId: string;         // 所属评论的ID
  targetCommentId: string | null;  // 被回复的评论ID
  parentId: string | null;   // 父回复的ID，如果直接回复评论则为null
  likes: number;
  dislikes: number;
  createTime: string;
  isLike: boolean;
  isDisLike: boolean;
  children: null;            // 这个字段可以保留但永远为null
}

// 修改点赞和点踩的类型
export interface LikeDislikeParams {
  id: string;
  type: 1 | 2;  // 1: 评论, 2: 回复
}
